import request from '@/utils/request'

// 审核商家
export function examineTenant(id, status) {
  return request({
    url: '/platForm/examineTenant/' + id,
    method: 'get',
    params: {
      status
    }
  })
}

// 查询首页广告
export function findBannerPics(data) {
  return request({
    url: '/platForm/findBannerPics',
    method: 'post',
    data: data
  })
}

// 勾选精选案例
export function recommendCase(id, isRecommend) {
  return request({
    url: '/platForm/recommendCase/' + id,
    method: 'get',
    params: {
      isRecommend
    }
  })
}

// 勾选精选商家
export function recommendTenant(id, isRecommend) {
  return request({
    url: '/platForm/recommendTenant/' + id,
    method: 'get',
    params: {
      isRecommend
    }
  })
}

// 添加首页banner
export function addBannerPics(data) {
  return request({
    url: '/platForm/addBannerPics',
    method: 'post',
    data: data
  })
}

// 添加商家
export function addTenant(data) {
  return request({
    url: '/platForm/addTenant',
    method: 'post',
    data: data
  })
}

// 查询商家列表
export function findTenantList(data) {
  return request({
    url: '/platForm/findTenantList',
    method: 'post',
    data: data
  })
}

// 修改首页banner
export function updateBannerPics(data) {
  return request({
    url: '/platForm/updateBannerPics',
    method: 'post',
    data: data
  })
}

// 查询小区列表
export function findDesiginArea(data) {
  return request({
    url: '/platForm/findDesiginArea',
    method: 'post',
    data: data
  })
}

// 查询所有案例
export function findAllCase(data) {
  return request({
    url: '/platForm/findAllCase',
    method: 'post',
    data: data
  })
}

// 查询未使用的账号
export function findNotUserNoList() {
  return request({
    url: '/platForm/findNotUserNoList',
    method: 'get'
  })
}

// 查询首页广告
export function findBannerPicsInfo(id) {
  return request({
    url: '/platForm/findBannerPicsInfo/' + id,
    method: 'get'
  })
}

// 删除首页banner
export function deleteBannerPics(bannerId) {
  return request({
    url: '/platForm/deleteBannerPics/' + bannerId,
    method: 'get'
  })
}

// 删除小区列表
export function deleteDesiginArea(areaId) {
  return request({
    url: '/platForm/deleteDesiginArea/' + areaId,
    method: 'get'
  })
}

// 新增小区列表
export function addDesiginArea(data) {
  return request({
    url: '/platForm/addDesiginArea',
    method: 'post',
    data: data
  })
}

// 修改小区列表
export function updateDesiginArea(data) {
  return request({
    url: '/platForm/updateDesiginArea',
    method: 'post',
    data: data
  })
}

// 平台删除案例
export function deleteCase(id) {
  return request({
    url: '/platForm/deleteCase/' + id,
    method: 'get'
  })
}

// 查询申请商家列表
export function findApplyTenantList(data) {
  return request({
    url: '/platForm/findApplyTenantList',
    method: 'post',
    data: data
  })
}

// 查询商家信息info
export function findTenantInfoById(tenantId) {
  return request({
    url: '/platForm/findTenantInfoById/' + tenantId,
    method: 'get'
  })
}

// 删除商家
export function deleteTenant(id) {
  return request({
    url: '/platForm/deleteTenant/' + id,
    method: 'get'
  })
}

// 查询案例风格列表
export function styleList() {
  return request({
    url: '/platForm/styles',
    method: 'get'
  })
}

// 分页获取案例风格列表
export function findCaseStyleList(data) {
  return request({
    url: '/platForm/findCaseStyleList',
    method: 'post',
    data: data
  })
}

// 删除风格byId
export function deleteCaseStyle(id) {
  return request({
    url: '/platForm/deleteCaseStyle/' + id,
    method: 'get'
  })
}

// 平台修改风格
export function updateCaseStyle(data) {
  return request({
    url: '/platForm/updateCaseStyle',
    method: 'post',
    data: data
  })
}

// 平台新增风格
export function addCaseStyle(data) {
  return request({
    url: '/platForm/addCaseStyle',
    method: 'post',
    data: data
  })
}

// 分页获取文章内容
export function findDesignArticle(data) {
  return request({
    url: '/platForm/findDesignArticle',
    method: 'post',
    data: data
  })
}

// 修改文章内容
export function updateDesignArticle(data) {
  return request({
    url: '/platForm/updateDesignArticle',
    method: 'post',
    data: data
  })
}

// 新增文章内容
export function saveDesignArticle(data) {
  return request({
    url: '/platForm/saveDesignArticle',
    method: 'post',
    data: data
  })
}

// 删除文章内容
export function deleteDesignArticle(id) {
  return request({
    url: '/platForm/deleteDesignArticle/' + id,
    method: 'get'
  })
}

// 通过id获取文章内容
export function findDesignArticleById(id) {
  return request({
    url: '/platForm/findDesignArticleById/' + id,
    method: 'get'
  })
}